import request from "@/utils/request"
import { Result } from "./type/globale"
import { HospitalDepartment, HospitalDetail, ScheduleDepartment, ScheduleListType } from "./type/hospital"

//获取医院详情
export const getHospitalDetailAPI=(hoscode:string)=>request.get<any,Result<HospitalDetail>>(`/hosp/hospital/${hoscode}`)

//获取医院部门列表
export const getHospitalDepartmentAPI=(hoscode:string)=>request.get<any,Result<HospitalDepartment>>(`/hosp/hospital/department/${hoscode}`)

//获取可预约科室
export const getSechduleDepartmentAPI=(page:number,limit:number,hoscode:string,depcode:string,)=>request.get<any,Result<ScheduleDepartment>>(`/hosp/hospital/auth/getBookingScheduleRule/${page}/${limit}/${hoscode}/${depcode}`)


//获取排班数据列表
export const getSechduleListAPI=(hoscode:string,depcode:string,workDate:string)=>request.get<any,Result<ScheduleListType>>(`/hosp/hospital/auth/findScheduleList/${hoscode}/${depcode}/${workDate}`)